import Vue from 'vue'
import VueRouter from 'vue-router'
//路由分模块
//患者端
//医生端
import Patient from './patient'
import doctor from './doctor'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/main'
  },
  // 除APP以外根页面
  {
    path: '/main',
    name: 'Main',
    component: () => import(/* webpackChunkName: "main" */ '../views/main/Main.vue'),
  },
  ...Patient,
  ...doctor
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
